package ejb;

import java.util.List;

import javax.ejb.Stateless;

import dao.ClassesDao;
import entity.Classes;

@Stateless
public class ClassesBean implements ClassesBeanRemote, ClassesBeanLocal {
	
	@Override
	public void insert(Classes clazz) {
		ClassesDao.INSTANCE.save(clazz);
	}

	@Override
	public void update(Classes clazz) {
		ClassesDao.INSTANCE.merge(clazz);
	}

	@Override
	public void delete(Classes clazz) {
		ClassesDao.INSTANCE.delete(clazz);
	}

	@Override
	public void get(Long id) {
		ClassesDao.INSTANCE.findById(id);
	}

	@Override
	public List<Classes> getAll() {
		return ClassesDao.INSTANCE.findAll();
	}

}
